#!/usr/bin/env python
# dtvremote
# Copyright (C) Jim Storch 2006
# requires dtvctrl.py, pyserial, pyGTK

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# set COMMAND_SET = 2 for the new serial commands
# used by RCA DRD4xxRG/H and others 
COMMAND_SET		=	1

# device the dtv receiver is wired to
SERIAL_DEVICE	=	'/dev/ttyS0'

# Channels to appear on the presents, flavor to taste
PRESET1_NAME	=	'AMC'
PRESET1_CHANNEL	=	254
PRESET2_NAME	=	'Cartoon Network'
PRESET2_CHANNEL	=	296
PRESET3_NAME	=	'Discovery Channel'
PRESET3_CHANNEL	=	278
PRESET4_NAME	=	'History Channel'
PRESET4_CHANNEL	=	269
PRESET5_NAME	=	'XM Cafe'
PRESET5_CHANNEL	=	832
PRESET6_NAME	=	'XM Music: Lucy'
PRESET6_CHANNEL	=	838
PRESET7_NAME	=	'XM Music: BPM'
PRESET7_CHANNEL	=	859
PRESET8_NAME	=	'XM Music: The System'
PRESET8_CHANNEL	=	860

import pygtk
pygtk.require('2.0')
import gtk
import gtk.glade
import serial

#import dtvcmd

class Receiver:
	def __init__(self, port, command_set=1):
		self.ser = serial.Serial(port, 9600, xonxoff=0, rtscts=0, \
			bytesize=8, parity='N', stopbits=1, timeout=None)
		self.ser.flushInput()
		self.ser.flushOutput()
		if command_set == 2:
			self.new_cmds=True
		else:
			self.new_cmds=False

	def __response(self, c):
		if c == '\xF0':
			return 'Command OK'
		if c == '\xF1':
			return 'Bad Command'
		if c == '\xF2':
			return 'Processing Command'
		if c == '\xF3':
			return 'Input Timeout'
		if c == '\xF4':
			return 'Command Complete'
		if c == '\xF5':
			return 'Command Failed'
		if c == '\xFB':
			return 'Illegal Input'
		if c == '\xFD':
			return 'Buffer Underflow'
		if c == '\xFF':
			return 'Buffer Overflow'
		return 'Unknown Error'

	def __cmdStatus(self):
		status = self.ser.read(1)
		#if status != '\xF0':
		#	print 'Error returned: ', self.__response(status) 

	def getDateTime(self):
		# Asks the unit for the date, time, and day of the week (Monday=1)
		if self.new_cmds:
			self.ser.write('\xFA\x91')
		else:
			self.ser.write('\xFA\x11')
		ok = self.ser.read(1)
		self.year  = ord(self.ser.read(1)) + 1993
		self.month = ord(self.ser.read(1))
		self.day   = ord(self.ser.read(1))
		self.hour  = ord(self.ser.read(1))
		self.min   = ord(self.ser.read(1))
		self.sec   = ord(self.ser.read(1))
		self.dow   = ord(self.ser.read(1))
		ok = self.ser.read(1)

	def powerOn(self):
		if self.new_cmds:
			self.ser.write('\xFA\x82')	
		else:
			self.ser.write('\xFA\x02')
		self.__cmdStatus()

	def powerOff(self):
		if self.new_cmds:
			self.ser.write('\xFA\x81')
		else:
			self.ser.write('\xFA\x01')
		self.__cmdStatus()

	def getSignalStrength(self):
		self.ser.flushInput()
		if self.new_cmds:
			self.ser.write('\xFA\x90')
		else:
			self.ser.write('\xFA\x10')
		ok = self.ser.read(1)
		self.signalStrength = ord(self.ser.read(1))
		ok = self.ser.read(1)
		return self.signalStrength

	def setChannel(self, channel):
		if self.new_cmds:
			self.ser.write('\xFA\xA6%c%c\xFF\xFF' % ((channel / 256), (channel % 256)))
		else:
			self.ser.write('\xFA\x46%c%c' % ((channel / 256), (channel % 256)))
	
		self.__cmdStatus()

	def getChannel(self):
		if self.new_cmds:
			self.ser.write('\xFA\x87')
		else:
			self.ser.write('\xFA\x07')
		ok = self.ser.read(1)
		hb = ord(self.ser.read(1))
		lb = ord(self.ser.read(1))
		if self.new_cmds:
			ok = self.ser.read(1)
			ok = self.ser.read(1)
		ok = self.ser.read(1)
		return (hb * 256) + lb

	def disableIR(self):
    	# Disable the infra-red remote control.
		if self.new_cmds:
			self.ser.write('\xFA\x94')
		else:
			self.ser.write('\xFA\x14')
		self.__cmdStatus()

	def enableIR(self):
		# Re-enable the infra-red remote control.
		if self.new_cmds:
			self.ser.write('\xFA\x93')
		else:
			self.ser.write('\xFA\x13')
		self.__cmdStatus()

	def showText(self, msg):
		# Displays msg for 5 mins OR hideText() is called, 
		# OR some manual display change.
		# My DRD303SA ignores messages > 15 characters.
		if self.new_cmds:
			self.ser.write('\xFA\x4A')
		else:
			self.ser.write('\xFA\x4A')
		self.ser.write(chr(len(msg)))
		self.ser.write(msg)
		self.ser.flushInput()
        
	def hideText(self):
		# Removes displayText() message from screen.
		if self.new_cmds:
			self.ser.write('\xFA\x86')
		else:
			self.ser.write('\xFA\x06')
		self.__cmdStatus()

	# The following functions mimic pressing the corresponding
	# buttons on the remote control.  
	# There are more, but they didn't seem worth writing funtions for.

	def channelUp(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xD2')
		else:
			self.ser.write('\xFA\x45\x00\x00\xD2')
		self.__cmdStatus()

	def channelDown(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xD3')
		else:
			self.ser.write('\xFA\x45\x00\x00\xD3')
		self.__cmdStatus()

	def info(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xC3')
		else:
			self.ser.write('\xFA\x45\x00\x00\xC3')
		self.__cmdStatus()

	def altAudio(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\x4F')
		else:
			self.ser.write('\xFA\x45\x00\x00\x4F')
		self.__cmdStatus()

	def menuOK(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xF7')
		else:
			self.ser.write('\xFA\x45\x00\x00\xF7')
		self.__cmdStatus()

	def prevChannel(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xD8')
		else:
			self.ser.write('\xFA\x45\x00\x00\xD8')
		self.__cmdStatus()

	def up(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xA6')
		else:
			self.ser.write('\xFA\x45\x00\x00\xA6')
		self.__cmdStatus()

	def down(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xA7')
		else:
			self.ser.write('\xFA\x45\x00\x00\xA7')
		self.__cmdStatus()

	def right(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xA8')
		else:
			self.ser.write('\xFA\x45\x00\x00\xA8')
		self.__cmdStatus()

	def left(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xA9')
		else:
			self.ser.write('\xFA\x45\x00\x00\xA9')
		self.__cmdStatus()

	def guide(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xE5')
		else:
			self.ser.write('\xFA\x45\x00\x00\xE5')
		self.__cmdStatus()

	def zero(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xCF')
		else:
			self.ser.write('\xFA\x45\x00\x00\xCF')
		self.__cmdStatus()

	def one(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xCE')
		else:
			self.ser.write('\xFA\x45\x00\x00\xCE')
		self.__cmdStatus()

	def two(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xCD')
		else:
			self.ser.write('\xFA\x45\x00\x00\xCD')
		self.__cmdStatus()

	def three(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xCC')
		else:
			self.ser.write('\xFA\x45\x00\x00\xCC')
		self.__cmdStatus()

	def four(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xCB')
		else:
			self.ser.write('\xFA\x45\x00\x00\xCB')
		self.__cmdStatus()

	def five(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xCA')
		else:
			self.ser.write('\xFA\x45\x00\x00\xCA')
		self.__cmdStatus()

	def six(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xC9')
		else:
			self.ser.write('\xFA\x45\x00\x00\xC9')
		self.__cmdStatus()

	def seven(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xC8')
		else:
			self.ser.write('\xFA\x45\x00\x00\xC8')
		self.__cmdStatus()

	def eight(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xC7')
		else:
			self.ser.write('\xFA\x45\x00\x00\xC7')
		self.__cmdStatus()

	def nine(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xC6')
		else:
			self.ser.write('\xFA\x45\x00\x00\xC6')
		self.__cmdStatus()

	def dss(self):
		if self.new_cmds:
			self.ser.write('\xFA\xA5\x00\x00\xC5')
		else:
			self.ser.write('\xFA\x45\x00\x00\xC5')
		self.__cmdStatus()




class Remote:

	def __init__(self):
		
		self.rcvr = Receiver(SERIAL_DEVICE, COMMAND_SET)
		# import GUI from xml string instead of file
		self.wTree=gtk.glade.xml_new_from_buffer(xml_buff, \
			len(xml_buff),root='remoteWindow')

		dic = {
			"on_remoteWindow_destroy" : self.destroy,
			"on_signal_clicked" : self.signal_clicked,
			"on_power_on_clicked" : self.power_on_clicked,
			"on_power_off_clicked" : self.power_off_clicked,
			"on_menu_up_clicked" : self.menu_up_clicked,
			"on_menu_down_clicked" : self.menu_down_clicked,
			"on_menu_left_clicked" : self.menu_left_clicked,
			"on_menu_right_clicked" : self.menu_right_clicked,
			"on_menu_ok_clicked" : self.menu_ok_clicked,
			"on_menu_clicked" : self.menu_clicked,
			"on_guide_clicked" : self.guide_clicked,
			"on_info_clicked" : self.info_clicked,
			"on_channel_up_clicked" : self.channel_up_clicked,
			"on_channel_down_clicked" : self.channel_down_clicked,
			"on_prev_channel_clicked" : self.prev_channel_clicked,
			"on_one_clicked" : self.one_clicked,
			"on_two_clicked" : self.two_clicked,
			"on_three_clicked" : self.three_clicked,
			"on_four_clicked" : self.four_clicked,
			"on_five_clicked" : self.five_clicked,
			"on_six_clicked" : self.six_clicked,
			"on_seven_clicked" : self.seven_clicked,
			"on_eight_clicked" : self.eight_clicked,
			"on_nine_clicked" : self.nine_clicked,
			"on_zero_clicked" : self.zero_clicked,
			
			"on_preset1_clicked" : self.preset1_clicked,
			"on_preset2_clicked" : self.preset2_clicked,
			"on_preset3_clicked" : self.preset3_clicked,			
			"on_preset4_clicked" : self.preset4_clicked,
			"on_preset5_clicked" : self.preset5_clicked,
			"on_preset6_clicked" : self.preset6_clicked,
			"on_preset7_clicked" : self.preset7_clicked,
			"on_preset8_clicked" : self.preset8_clicked,
			 }
		
		self.wTree.signal_autoconnect(dic)
		
		# update the preset button labels to user settings
		preset=self.wTree.get_widget("preset1")
		preset.set_label(PRESET1_NAME)
		preset=self.wTree.get_widget("preset2")
		preset.set_label(PRESET2_NAME)	
		preset=self.wTree.get_widget("preset3")
		preset.set_label(PRESET3_NAME)	
		preset=self.wTree.get_widget("preset4")
		preset.set_label(PRESET4_NAME)	
		preset=self.wTree.get_widget("preset5")
		preset.set_label(PRESET5_NAME)	
		preset=self.wTree.get_widget("preset6")
		preset.set_label(PRESET6_NAME)	
		preset=self.wTree.get_widget("preset7")
		preset.set_label(PRESET7_NAME)	
		preset=self.wTree.get_widget("preset8")
		preset.set_label(PRESET8_NAME)	
		
	def destroy(self, widget, data=None):
		gtk.main_quit()
		
	def signal_clicked(self, widget, data=None):
		i = self.rcvr.getSignalStrength()
		bar=self.wTree.get_widget("progressbar1")
		bar.set_fraction(i / 100.0)
		bar.set_text("%d" % i)
		
	def power_on_clicked(self, widget, data=None):
		self.rcvr.powerOn()
		
	def power_off_clicked(self, widget, data=None):
		self.rcvr.powerOff()
		
	def menu_up_clicked(self, widget, data=None):
		self.rcvr.up()
		
	def menu_down_clicked(self, widget, data=None):
		self.rcvr.down()
		
	def menu_left_clicked(self, widget, data=None):
		self.rcvr.left()

	def menu_right_clicked(self, widget, data=None):
		self.rcvr.right()
		
	def menu_ok_clicked(self, widget, data=None):
		self.rcvr.menuOK()
		
	def menu_clicked(self, widget, data=None):
		self.rcvr.menuOK()

	def guide_clicked(self, widget, data=None):
		self.rcvr.guide()

	def info_clicked(self, widget, data=None):
		self.rcvr.info()

	def channel_up_clicked(self, widget, data=None):
		self.rcvr.channelUp()

	def channel_down_clicked(self, widget, data=None):
		self.rcvr.channelDown()

	def prev_channel_clicked(self, widget, data=None):
		self.rcvr.prevChannel()
		
	def one_clicked(self, widget, data=None):
		self.rcvr.one()

	def two_clicked(self, widget, data=None):
		self.rcvr.two()

	def three_clicked(self, widget, data=None):
		self.rcvr.three()

	def four_clicked(self, widget, data=None):
		self.rcvr.four()

	def five_clicked(self, widget, data=None):
		self.rcvr.five()

	def six_clicked(self, widget, data=None):
		self.rcvr.six()

	def seven_clicked(self, widget, data=None):
		self.rcvr.seven()

	def eight_clicked(self, widget, data=None):
		self.rcvr.eight()

	def nine_clicked(self, widget, data=None):
		self.rcvr.nine()

	def zero_clicked(self, widget, data=None):
		self.rcvr.zero()
		
	def preset1_clicked(self, widget, data=None):
		self.rcvr.setChannel(PRESET1_CHANNEL)
	
	def preset2_clicked(self, widget, data=None):
		self.rcvr.setChannel(PRESET2_CHANNEL)

	def preset3_clicked(self, widget, data=None):
		self.rcvr.setChannel(PRESET3_CHANNEL)
		
	def preset4_clicked(self, widget, data=None):
		self.rcvr.setChannel(PRESET4_CHANNEL)
		
	def preset5_clicked(self, widget, data=None):
		self.rcvr.setChannel(PRESET5_CHANNEL)
	
	def preset6_clicked(self, widget, data=None):
		self.rcvr.setChannel(PRESET6_CHANNEL)

	def preset7_clicked(self, widget, data=None):
		self.rcvr.setChannel(PRESET7_CHANNEL)

	def preset8_clicked(self, widget, data=None):
		self.rcvr.setChannel(PRESET8_CHANNEL)


#	what follows is a glade file, cut and pasted in

xml_buff="""<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">

<glade-interface>

<widget class="GtkWindow" id="remoteWindow">
  <property name="border_width">4</property>
  <property name="visible">True</property>
  <property name="title" translatable="yes">dtvremote</property>
  <property name="type">GTK_WINDOW_TOPLEVEL</property>
  <property name="window_position">GTK_WIN_POS_CENTER</property>
  <property name="modal">False</property>
  <property name="resizable">True</property>
  <property name="destroy_with_parent">False</property>
  <property name="decorated">True</property>
  <property name="skip_taskbar_hint">False</property>
  <property name="skip_pager_hint">False</property>
  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
  <property name="focus_on_map">True</property>
  <signal name="destroy" handler="on_remoteWindow_destroy" last_modification_time="Sat, 23 Apr 2005 09:25:54 GMT"/>

  <child>
    <widget class="GtkVBox" id="vbox1">
      <property name="visible">True</property>
      <property name="homogeneous">False</property>
      <property name="spacing">0</property>

      <child>
	<widget class="GtkTable" id="table4">
	  <property name="visible">True</property>
	  <property name="n_rows">1</property>
	  <property name="n_columns">2</property>
	  <property name="homogeneous">True</property>
	  <property name="row_spacing">3</property>
	  <property name="column_spacing">3</property>

	  <child>
	    <widget class="GtkButton" id="power_off">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_power_off_clicked" last_modification_time="Fri, 22 Apr 2005 14:22:20 GMT"/>

	      <child>
		<widget class="GtkAlignment" id="alignment15">
		  <property name="visible">True</property>
		  <property name="xalign">0.5</property>
		  <property name="yalign">0.5</property>
		  <property name="xscale">0</property>
		  <property name="yscale">0</property>
		  <property name="top_padding">0</property>
		  <property name="bottom_padding">0</property>
		  <property name="left_padding">0</property>
		  <property name="right_padding">0</property>

		  <child>
		    <widget class="GtkHBox" id="hbox16">
		      <property name="visible">True</property>
		      <property name="homogeneous">False</property>
		      <property name="spacing">2</property>

		      <child>
			<widget class="GtkImage" id="image15">
			  <property name="visible">True</property>
			  <property name="stock">gtk-cancel</property>
			  <property name="icon_size">4</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>

		      <child>
			<widget class="GtkLabel" id="label15">
			  <property name="visible">True</property>
			  <property name="label" translatable="yes">Off</property>
			  <property name="use_underline">True</property>
			  <property name="use_markup">False</property>
			  <property name="justify">GTK_JUSTIFY_LEFT</property>
			  <property name="wrap">False</property>
			  <property name="selectable">False</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
			  <property name="width_chars">-1</property>
			  <property name="single_line_mode">False</property>
			  <property name="angle">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>
		    </widget>
		  </child>
		</widget>
	      </child>
	    </widget>
	    <packing>
	      <property name="left_attach">1</property>
	      <property name="right_attach">2</property>
	      <property name="top_attach">0</property>
	      <property name="bottom_attach">1</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="power_on">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_power_on_clicked" last_modification_time="Fri, 22 Apr 2005 14:05:14 GMT"/>

	      <child>
		<widget class="GtkAlignment" id="alignment14">
		  <property name="visible">True</property>
		  <property name="xalign">0.5</property>
		  <property name="yalign">0.5</property>
		  <property name="xscale">0</property>
		  <property name="yscale">0</property>
		  <property name="top_padding">0</property>
		  <property name="bottom_padding">0</property>
		  <property name="left_padding">0</property>
		  <property name="right_padding">0</property>

		  <child>
		    <widget class="GtkHBox" id="hbox15">
		      <property name="visible">True</property>
		      <property name="homogeneous">False</property>
		      <property name="spacing">2</property>

		      <child>
			<widget class="GtkImage" id="image14">
			  <property name="visible">True</property>
			  <property name="stock">gtk-add</property>
			  <property name="icon_size">4</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>

		      <child>
			<widget class="GtkLabel" id="label14">
			  <property name="visible">True</property>
			  <property name="label" translatable="yes">On</property>
			  <property name="use_underline">True</property>
			  <property name="use_markup">False</property>
			  <property name="justify">GTK_JUSTIFY_LEFT</property>
			  <property name="wrap">False</property>
			  <property name="selectable">False</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
			  <property name="width_chars">-1</property>
			  <property name="single_line_mode">False</property>
			  <property name="angle">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>
		    </widget>
		  </child>
		</widget>
	      </child>
	    </widget>
	    <packing>
	      <property name="left_attach">0</property>
	      <property name="right_attach">1</property>
	      <property name="top_attach">0</property>
	      <property name="bottom_attach">1</property>
	    </packing>
	  </child>
	</widget>
	<packing>
	  <property name="padding">0</property>
	  <property name="expand">True</property>
	  <property name="fill">True</property>
	</packing>
      </child>

      <child>
	<widget class="GtkHSeparator" id="hseparator5">
	  <property name="visible">True</property>
	</widget>
	<packing>
	  <property name="padding">4</property>
	  <property name="expand">True</property>
	  <property name="fill">True</property>
	</packing>
      </child>

      <child>
	<widget class="GtkProgressBar" id="progressbar1">
	  <property name="visible">True</property>
	  <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
	  <property name="fraction">0</property>
	  <property name="pulse_step">0.10000000149</property>
	  <property name="text" translatable="yes">(unknown)</property>
	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
	</widget>
	<packing>
	  <property name="padding">2</property>
	  <property name="expand">False</property>
	  <property name="fill">False</property>
	</packing>
      </child>

      <child>
	<widget class="GtkButton" id="signal">
	  <property name="visible">True</property>
	  <property name="can_focus">True</property>
	  <property name="relief">GTK_RELIEF_NORMAL</property>
	  <property name="focus_on_click">True</property>
	  <signal name="clicked" handler="on_signal_clicked" last_modification_time="Sat, 23 Apr 2005 11:03:12 GMT"/>

	  <child>
	    <widget class="GtkAlignment" id="alignment20">
	      <property name="visible">True</property>
	      <property name="xalign">0.5</property>
	      <property name="yalign">0.5</property>
	      <property name="xscale">0</property>
	      <property name="yscale">0</property>
	      <property name="top_padding">0</property>
	      <property name="bottom_padding">0</property>
	      <property name="left_padding">0</property>
	      <property name="right_padding">0</property>

	      <child>
		<widget class="GtkHBox" id="hbox21">
		  <property name="visible">True</property>
		  <property name="homogeneous">False</property>
		  <property name="spacing">2</property>

		  <child>
		    <widget class="GtkImage" id="image21">
		      <property name="visible">True</property>
		      <property name="stock">gtk-zoom-fit</property>
		      <property name="icon_size">4</property>
		      <property name="xalign">0.5</property>
		      <property name="yalign">0.5</property>
		      <property name="xpad">0</property>
		      <property name="ypad">0</property>
		    </widget>
		    <packing>
		      <property name="padding">0</property>
		      <property name="expand">False</property>
		      <property name="fill">False</property>
		    </packing>
		  </child>

		  <child>
		    <widget class="GtkLabel" id="label20">
		      <property name="visible">True</property>
		      <property name="label" translatable="yes">Test Signal Strength</property>
		      <property name="use_underline">True</property>
		      <property name="use_markup">False</property>
		      <property name="justify">GTK_JUSTIFY_LEFT</property>
		      <property name="wrap">False</property>
		      <property name="selectable">False</property>
		      <property name="xalign">0.5</property>
		      <property name="yalign">0.5</property>
		      <property name="xpad">0</property>
		      <property name="ypad">0</property>
		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
		      <property name="width_chars">-1</property>
		      <property name="single_line_mode">False</property>
		      <property name="angle">0</property>
		    </widget>
		    <packing>
		      <property name="padding">0</property>
		      <property name="expand">False</property>
		      <property name="fill">False</property>
		    </packing>
		  </child>
		</widget>
	      </child>
	    </widget>
	  </child>
	</widget>
	<packing>
	  <property name="padding">0</property>
	  <property name="expand">False</property>
	  <property name="fill">False</property>
	</packing>
      </child>

      <child>
	<widget class="GtkHSeparator" id="hseparator2">
	  <property name="visible">True</property>
	</widget>
	<packing>
	  <property name="padding">4</property>
	  <property name="expand">True</property>
	  <property name="fill">True</property>
	</packing>
      </child>

      <child>
	<widget class="GtkTable" id="table1">
	  <property name="visible">True</property>
	  <property name="n_rows">3</property>
	  <property name="n_columns">3</property>
	  <property name="homogeneous">True</property>
	  <property name="row_spacing">3</property>
	  <property name="column_spacing">3</property>

	  <child>
	    <widget class="GtkButton" id="menu_up">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_menu_up_clicked" last_modification_time="Fri, 22 Apr 2005 14:26:14 GMT"/>

	      <child>
		<widget class="GtkAlignment" id="alignment1">
		  <property name="visible">True</property>
		  <property name="xalign">0.5</property>
		  <property name="yalign">0.5</property>
		  <property name="xscale">0</property>
		  <property name="yscale">0</property>
		  <property name="top_padding">0</property>
		  <property name="bottom_padding">0</property>
		  <property name="left_padding">0</property>
		  <property name="right_padding">0</property>

		  <child>
		    <widget class="GtkHBox" id="menuUp">
		      <property name="visible">True</property>
		      <property name="homogeneous">False</property>
		      <property name="spacing">2</property>

		      <child>
			<widget class="GtkImage" id="image1">
			  <property name="visible">True</property>
			  <property name="stock">gtk-go-up</property>
			  <property name="icon_size">4</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>

		      <child>
			<widget class="GtkLabel" id="label1">
			  <property name="visible">True</property>
			  <property name="label" translatable="yes"></property>
			  <property name="use_underline">True</property>
			  <property name="use_markup">False</property>
			  <property name="justify">GTK_JUSTIFY_LEFT</property>
			  <property name="wrap">False</property>
			  <property name="selectable">False</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
			  <property name="width_chars">-1</property>
			  <property name="single_line_mode">False</property>
			  <property name="angle">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>
		    </widget>
		  </child>
		</widget>
	      </child>
	    </widget>
	    <packing>
	      <property name="left_attach">1</property>
	      <property name="right_attach">2</property>
	      <property name="top_attach">0</property>
	      <property name="bottom_attach">1</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="menu_left">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_menu_left_clicked" last_modification_time="Fri, 22 Apr 2005 14:26:26 GMT"/>

	      <child>
		<widget class="GtkAlignment" id="alignment3">
		  <property name="visible">True</property>
		  <property name="xalign">0.5</property>
		  <property name="yalign">0.5</property>
		  <property name="xscale">0</property>
		  <property name="yscale">0</property>
		  <property name="top_padding">0</property>
		  <property name="bottom_padding">0</property>
		  <property name="left_padding">0</property>
		  <property name="right_padding">0</property>

		  <child>
		    <widget class="GtkHBox" id="hbox3">
		      <property name="visible">True</property>
		      <property name="homogeneous">False</property>
		      <property name="spacing">2</property>

		      <child>
			<widget class="GtkImage" id="image3">
			  <property name="visible">True</property>
			  <property name="stock">gtk-go-back</property>
			  <property name="icon_size">4</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>

		      <child>
			<widget class="GtkLabel" id="label3">
			  <property name="visible">True</property>
			  <property name="label" translatable="yes"></property>
			  <property name="use_underline">True</property>
			  <property name="use_markup">False</property>
			  <property name="justify">GTK_JUSTIFY_LEFT</property>
			  <property name="wrap">False</property>
			  <property name="selectable">False</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
			  <property name="width_chars">-1</property>
			  <property name="single_line_mode">False</property>
			  <property name="angle">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>
		    </widget>
		  </child>
		</widget>
	      </child>
	    </widget>
	    <packing>
	      <property name="left_attach">0</property>
	      <property name="right_attach">1</property>
	      <property name="top_attach">1</property>
	      <property name="bottom_attach">2</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="menu_right">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_menu_right_clicked" last_modification_time="Fri, 22 Apr 2005 14:26:37 GMT"/>

	      <child>
		<widget class="GtkAlignment" id="alignment4">
		  <property name="visible">True</property>
		  <property name="xalign">0.5</property>
		  <property name="yalign">0.5</property>
		  <property name="xscale">0</property>
		  <property name="yscale">0</property>
		  <property name="top_padding">0</property>
		  <property name="bottom_padding">0</property>
		  <property name="left_padding">0</property>
		  <property name="right_padding">0</property>

		  <child>
		    <widget class="GtkHBox" id="hbox4">
		      <property name="visible">True</property>
		      <property name="homogeneous">False</property>
		      <property name="spacing">2</property>

		      <child>
			<widget class="GtkImage" id="image4">
			  <property name="visible">True</property>
			  <property name="stock">gtk-go-forward</property>
			  <property name="icon_size">4</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>

		      <child>
			<widget class="GtkLabel" id="label4">
			  <property name="visible">True</property>
			  <property name="label" translatable="yes"></property>
			  <property name="use_underline">True</property>
			  <property name="use_markup">False</property>
			  <property name="justify">GTK_JUSTIFY_LEFT</property>
			  <property name="wrap">False</property>
			  <property name="selectable">False</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
			  <property name="width_chars">-1</property>
			  <property name="single_line_mode">False</property>
			  <property name="angle">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>
		    </widget>
		  </child>
		</widget>
	      </child>
	    </widget>
	    <packing>
	      <property name="left_attach">2</property>
	      <property name="right_attach">3</property>
	      <property name="top_attach">1</property>
	      <property name="bottom_attach">2</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="menu_ok">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_menu_ok_clicked" last_modification_time="Fri, 22 Apr 2005 14:26:50 GMT"/>

	      <child>
		<widget class="GtkImage" id="image18">
		  <property name="visible">True</property>
		  <property name="stock">gtk-apply</property>
		  <property name="icon_size">4</property>
		  <property name="xalign">0.5</property>
		  <property name="yalign">0.5</property>
		  <property name="xpad">0</property>
		  <property name="ypad">0</property>
		</widget>
	      </child>
	    </widget>
	    <packing>
	      <property name="left_attach">1</property>
	      <property name="right_attach">2</property>
	      <property name="top_attach">1</property>
	      <property name="bottom_attach">2</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="menu_down">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_menu_down_clicked" last_modification_time="Fri, 22 Apr 2005 14:26:43 GMT"/>

	      <child>
		<widget class="GtkAlignment" id="alignment2">
		  <property name="visible">True</property>
		  <property name="xalign">0.5</property>
		  <property name="yalign">0.5</property>
		  <property name="xscale">0</property>
		  <property name="yscale">0</property>
		  <property name="top_padding">0</property>
		  <property name="bottom_padding">0</property>
		  <property name="left_padding">0</property>
		  <property name="right_padding">0</property>

		  <child>
		    <widget class="GtkHBox" id="hbox2">
		      <property name="visible">True</property>
		      <property name="homogeneous">False</property>
		      <property name="spacing">2</property>

		      <child>
			<widget class="GtkImage" id="image2">
			  <property name="visible">True</property>
			  <property name="stock">gtk-go-down</property>
			  <property name="icon_size">4</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>

		      <child>
			<widget class="GtkLabel" id="label2">
			  <property name="visible">True</property>
			  <property name="label" translatable="yes"></property>
			  <property name="use_underline">True</property>
			  <property name="use_markup">False</property>
			  <property name="justify">GTK_JUSTIFY_LEFT</property>
			  <property name="wrap">False</property>
			  <property name="selectable">False</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
			  <property name="width_chars">-1</property>
			  <property name="single_line_mode">False</property>
			  <property name="angle">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>
		    </widget>
		  </child>
		</widget>
	      </child>
	    </widget>
	    <packing>
	      <property name="left_attach">1</property>
	      <property name="right_attach">2</property>
	      <property name="top_attach">2</property>
	      <property name="bottom_attach">3</property>
	    </packing>
	  </child>
	</widget>
	<packing>
	  <property name="padding">0</property>
	  <property name="expand">True</property>
	  <property name="fill">True</property>
	</packing>
      </child>

      <child>
	<widget class="GtkHSeparator" id="hseparator3">
	  <property name="visible">True</property>
	</widget>
	<packing>
	  <property name="padding">4</property>
	  <property name="expand">True</property>
	  <property name="fill">True</property>
	</packing>
      </child>

      <child>
	<widget class="GtkTable" id="table3">
	  <property name="visible">True</property>
	  <property name="n_rows">3</property>
	  <property name="n_columns">2</property>
	  <property name="homogeneous">True</property>
	  <property name="row_spacing">3</property>
	  <property name="column_spacing">3</property>

	  <child>
	    <widget class="GtkButton" id="channel_down">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_channel_down_clicked" last_modification_time="Fri, 22 Apr 2005 14:38:53 GMT"/>
	      <accelerator key="D" modifiers="0" signal="clicked"/>
	      <accelerator key="d" modifiers="0" signal="clicked"/>

	      <child>
		<widget class="GtkAlignment" id="alignment10">
		  <property name="visible">True</property>
		  <property name="xalign">0.5</property>
		  <property name="yalign">0.5</property>
		  <property name="xscale">0</property>
		  <property name="yscale">0</property>
		  <property name="top_padding">0</property>
		  <property name="bottom_padding">0</property>
		  <property name="left_padding">0</property>
		  <property name="right_padding">0</property>

		  <child>
		    <widget class="GtkHBox" id="hbox11">
		      <property name="visible">True</property>
		      <property name="homogeneous">False</property>
		      <property name="spacing">2</property>

		      <child>
			<widget class="GtkImage" id="image10">
			  <property name="visible">True</property>
			  <property name="stock">gtk-go-down</property>
			  <property name="icon_size">4</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>

		      <child>
			<widget class="GtkLabel" id="label10">
			  <property name="visible">True</property>
			  <property name="label" translatable="yes">_Dn</property>
			  <property name="use_underline">True</property>
			  <property name="use_markup">False</property>
			  <property name="justify">GTK_JUSTIFY_LEFT</property>
			  <property name="wrap">False</property>
			  <property name="selectable">False</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
			  <property name="width_chars">-1</property>
			  <property name="single_line_mode">False</property>
			  <property name="angle">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>
		    </widget>
		  </child>
		</widget>
	      </child>
	    </widget>
	    <packing>
	      <property name="left_attach">1</property>
	      <property name="right_attach">2</property>
	      <property name="top_attach">2</property>
	      <property name="bottom_attach">3</property>
	      <property name="y_options">fill</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="prev_channel">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_prev_channel_clicked" last_modification_time="Fri, 22 Apr 2005 14:38:48 GMT"/>
	      <accelerator key="P" modifiers="0" signal="clicked"/>
	      <accelerator key="p" modifiers="0" signal="clicked"/>

	      <child>
		<widget class="GtkAlignment" id="alignment19">
		  <property name="visible">True</property>
		  <property name="xalign">0.5</property>
		  <property name="yalign">0.5</property>
		  <property name="xscale">0</property>
		  <property name="yscale">0</property>
		  <property name="top_padding">0</property>
		  <property name="bottom_padding">0</property>
		  <property name="left_padding">0</property>
		  <property name="right_padding">0</property>

		  <child>
		    <widget class="GtkHBox" id="hbox20">
		      <property name="visible">True</property>
		      <property name="homogeneous">False</property>
		      <property name="spacing">2</property>

		      <child>
			<widget class="GtkImage" id="image20">
			  <property name="visible">True</property>
			  <property name="stock">gtk-undo</property>
			  <property name="icon_size">4</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>

		      <child>
			<widget class="GtkLabel" id="label19">
			  <property name="visible">True</property>
			  <property name="label" translatable="yes">_Prev</property>
			  <property name="use_underline">True</property>
			  <property name="use_markup">False</property>
			  <property name="justify">GTK_JUSTIFY_LEFT</property>
			  <property name="wrap">False</property>
			  <property name="selectable">False</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
			  <property name="width_chars">-1</property>
			  <property name="single_line_mode">False</property>
			  <property name="angle">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>
		    </widget>
		  </child>
		</widget>
	      </child>
	    </widget>
	    <packing>
	      <property name="left_attach">0</property>
	      <property name="right_attach">1</property>
	      <property name="top_attach">2</property>
	      <property name="bottom_attach">3</property>
	      <property name="y_options">fill</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="info">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_info_clicked" last_modification_time="Fri, 22 Apr 2005 14:38:12 GMT"/>
	      <accelerator key="I" modifiers="0" signal="clicked"/>
	      <accelerator key="i" modifiers="0" signal="clicked"/>

	      <child>
		<widget class="GtkAlignment" id="alignment11">
		  <property name="visible">True</property>
		  <property name="xalign">0.5</property>
		  <property name="yalign">0.5</property>
		  <property name="xscale">0</property>
		  <property name="yscale">0</property>
		  <property name="top_padding">0</property>
		  <property name="bottom_padding">0</property>
		  <property name="left_padding">0</property>
		  <property name="right_padding">0</property>

		  <child>
		    <widget class="GtkHBox" id="hbox12">
		      <property name="visible">True</property>
		      <property name="homogeneous">False</property>
		      <property name="spacing">2</property>

		      <child>
			<widget class="GtkImage" id="image11">
			  <property name="visible">True</property>
			  <property name="stock">gtk-dialog-info</property>
			  <property name="icon_size">4</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>

		      <child>
			<widget class="GtkLabel" id="label11">
			  <property name="visible">True</property>
			  <property name="label" translatable="yes">_Info</property>
			  <property name="use_underline">True</property>
			  <property name="use_markup">False</property>
			  <property name="justify">GTK_JUSTIFY_LEFT</property>
			  <property name="wrap">False</property>
			  <property name="selectable">False</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
			  <property name="width_chars">-1</property>
			  <property name="single_line_mode">False</property>
			  <property name="angle">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>
		    </widget>
		  </child>
		</widget>
	      </child>
	    </widget>
	    <packing>
	      <property name="left_attach">0</property>
	      <property name="right_attach">1</property>
	      <property name="top_attach">1</property>
	      <property name="bottom_attach">2</property>
	      <property name="y_options">fill</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="channel_up">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_channel_up_clicked" last_modification_time="Fri, 22 Apr 2005 14:38:18 GMT"/>
	      <accelerator key="U" modifiers="0" signal="clicked"/>
	      <accelerator key="u" modifiers="0" signal="clicked"/>

	      <child>
		<widget class="GtkAlignment" id="alignment9">
		  <property name="visible">True</property>
		  <property name="xalign">0.5</property>
		  <property name="yalign">0.5</property>
		  <property name="xscale">0</property>
		  <property name="yscale">0</property>
		  <property name="top_padding">0</property>
		  <property name="bottom_padding">0</property>
		  <property name="left_padding">0</property>
		  <property name="right_padding">0</property>

		  <child>
		    <widget class="GtkHBox" id="hbox10">
		      <property name="visible">True</property>
		      <property name="homogeneous">False</property>
		      <property name="spacing">2</property>

		      <child>
			<widget class="GtkImage" id="image9">
			  <property name="visible">True</property>
			  <property name="stock">gtk-go-up</property>
			  <property name="icon_size">4</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>

		      <child>
			<widget class="GtkLabel" id="label9">
			  <property name="visible">True</property>
			  <property name="label" translatable="yes">_Up</property>
			  <property name="use_underline">True</property>
			  <property name="use_markup">False</property>
			  <property name="justify">GTK_JUSTIFY_LEFT</property>
			  <property name="wrap">False</property>
			  <property name="selectable">False</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
			  <property name="width_chars">-1</property>
			  <property name="single_line_mode">False</property>
			  <property name="angle">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>
		    </widget>
		  </child>
		</widget>
	      </child>
	    </widget>
	    <packing>
	      <property name="left_attach">1</property>
	      <property name="right_attach">2</property>
	      <property name="top_attach">1</property>
	      <property name="bottom_attach">2</property>
	      <property name="y_options">fill</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="guide">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_guide_clicked" last_modification_time="Fri, 22 Apr 2005 14:38:07 GMT"/>
	      <accelerator key="G" modifiers="0" signal="clicked"/>
	      <accelerator key="g" modifiers="0" signal="clicked"/>

	      <child>
		<widget class="GtkAlignment" id="alignment17">
		  <property name="visible">True</property>
		  <property name="xalign">0.5</property>
		  <property name="yalign">0.5</property>
		  <property name="xscale">0</property>
		  <property name="yscale">0</property>
		  <property name="top_padding">0</property>
		  <property name="bottom_padding">0</property>
		  <property name="left_padding">0</property>
		  <property name="right_padding">0</property>

		  <child>
		    <widget class="GtkHBox" id="hbox18">
		      <property name="visible">True</property>
		      <property name="homogeneous">False</property>
		      <property name="spacing">2</property>

		      <child>
			<widget class="GtkImage" id="image17">
			  <property name="visible">True</property>
			  <property name="stock">gtk-index</property>
			  <property name="icon_size">4</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>

		      <child>
			<widget class="GtkLabel" id="label17">
			  <property name="visible">True</property>
			  <property name="label" translatable="yes">_Guide</property>
			  <property name="use_underline">True</property>
			  <property name="use_markup">False</property>
			  <property name="justify">GTK_JUSTIFY_LEFT</property>
			  <property name="wrap">False</property>
			  <property name="selectable">False</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
			  <property name="width_chars">-1</property>
			  <property name="single_line_mode">False</property>
			  <property name="angle">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>
		    </widget>
		  </child>
		</widget>
	      </child>
	    </widget>
	    <packing>
	      <property name="left_attach">1</property>
	      <property name="right_attach">2</property>
	      <property name="top_attach">0</property>
	      <property name="bottom_attach">1</property>
	      <property name="y_options">fill</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="menu">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_menu_clicked" last_modification_time="Fri, 22 Apr 2005 14:26:55 GMT"/>
	      <accelerator key="M" modifiers="0" signal="clicked"/>
	      <accelerator key="m" modifiers="0" signal="clicked"/>

	      <child>
		<widget class="GtkAlignment" id="alignment18">
		  <property name="visible">True</property>
		  <property name="xalign">0.5</property>
		  <property name="yalign">0.5</property>
		  <property name="xscale">0</property>
		  <property name="yscale">0</property>
		  <property name="top_padding">0</property>
		  <property name="bottom_padding">0</property>
		  <property name="left_padding">0</property>
		  <property name="right_padding">0</property>

		  <child>
		    <widget class="GtkHBox" id="hbox19">
		      <property name="visible">True</property>
		      <property name="homogeneous">False</property>
		      <property name="spacing">2</property>

		      <child>
			<widget class="GtkImage" id="image19">
			  <property name="visible">True</property>
			  <property name="stock">gtk-properties</property>
			  <property name="icon_size">4</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>

		      <child>
			<widget class="GtkLabel" id="label18">
			  <property name="visible">True</property>
			  <property name="label" translatable="yes">_Menu</property>
			  <property name="use_underline">True</property>
			  <property name="use_markup">False</property>
			  <property name="justify">GTK_JUSTIFY_LEFT</property>
			  <property name="wrap">False</property>
			  <property name="selectable">False</property>
			  <property name="xalign">0.5</property>
			  <property name="yalign">0.5</property>
			  <property name="xpad">0</property>
			  <property name="ypad">0</property>
			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
			  <property name="width_chars">-1</property>
			  <property name="single_line_mode">False</property>
			  <property name="angle">0</property>
			</widget>
			<packing>
			  <property name="padding">0</property>
			  <property name="expand">False</property>
			  <property name="fill">False</property>
			</packing>
		      </child>
		    </widget>
		  </child>
		</widget>
	      </child>
	    </widget>
	    <packing>
	      <property name="left_attach">0</property>
	      <property name="right_attach">1</property>
	      <property name="top_attach">0</property>
	      <property name="bottom_attach">1</property>
	      <property name="y_options">fill</property>
	    </packing>
	  </child>
	</widget>
	<packing>
	  <property name="padding">0</property>
	  <property name="expand">True</property>
	  <property name="fill">True</property>
	</packing>
      </child>

      <child>
	<widget class="GtkHSeparator" id="hseparator1">
	  <property name="visible">True</property>
	</widget>
	<packing>
	  <property name="padding">4</property>
	  <property name="expand">True</property>
	  <property name="fill">True</property>
	</packing>
      </child>

      <child>
	<widget class="GtkTable" id="table2">
	  <property name="visible">True</property>
	  <property name="n_rows">4</property>
	  <property name="n_columns">3</property>
	  <property name="homogeneous">True</property>
	  <property name="row_spacing">3</property>
	  <property name="column_spacing">3</property>

	  <child>
	    <widget class="GtkButton" id="one">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">_1</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_one_clicked" last_modification_time="Fri, 22 Apr 2005 14:38:57 GMT"/>
	      <accelerator key="1" modifiers="0" signal="clicked"/>
	    </widget>
	    <packing>
	      <property name="left_attach">0</property>
	      <property name="right_attach">1</property>
	      <property name="top_attach">0</property>
	      <property name="bottom_attach">1</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="two">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">_2</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_two_clicked" last_modification_time="Fri, 22 Apr 2005 14:39:04 GMT"/>
	      <accelerator key="2" modifiers="0" signal="clicked"/>
	    </widget>
	    <packing>
	      <property name="left_attach">1</property>
	      <property name="right_attach">2</property>
	      <property name="top_attach">0</property>
	      <property name="bottom_attach">1</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="three">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">_3</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_three_clicked" last_modification_time="Fri, 22 Apr 2005 14:39:15 GMT"/>
	      <accelerator key="3" modifiers="0" signal="clicked"/>
	    </widget>
	    <packing>
	      <property name="left_attach">2</property>
	      <property name="right_attach">3</property>
	      <property name="top_attach">0</property>
	      <property name="bottom_attach">1</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="four">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">_4</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_four_clicked" last_modification_time="Fri, 22 Apr 2005 14:39:21 GMT"/>
	      <accelerator key="4" modifiers="0" signal="clicked"/>
	    </widget>
	    <packing>
	      <property name="left_attach">0</property>
	      <property name="right_attach">1</property>
	      <property name="top_attach">1</property>
	      <property name="bottom_attach">2</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="five">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">_5</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_five_clicked" last_modification_time="Fri, 22 Apr 2005 14:39:29 GMT"/>
	      <accelerator key="5" modifiers="0" signal="clicked"/>
	    </widget>
	    <packing>
	      <property name="left_attach">1</property>
	      <property name="right_attach">2</property>
	      <property name="top_attach">1</property>
	      <property name="bottom_attach">2</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="six">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">_6</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_six_clicked" last_modification_time="Fri, 22 Apr 2005 14:39:33 GMT"/>
	      <accelerator key="6" modifiers="0" signal="clicked"/>
	    </widget>
	    <packing>
	      <property name="left_attach">2</property>
	      <property name="right_attach">3</property>
	      <property name="top_attach">1</property>
	      <property name="bottom_attach">2</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="seven">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">_7</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_seven_clicked" last_modification_time="Fri, 22 Apr 2005 14:39:38 GMT"/>
	      <accelerator key="7" modifiers="0" signal="clicked"/>
	    </widget>
	    <packing>
	      <property name="left_attach">0</property>
	      <property name="right_attach">1</property>
	      <property name="top_attach">2</property>
	      <property name="bottom_attach">3</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="eight">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">_8</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_eight_clicked" last_modification_time="Fri, 22 Apr 2005 14:39:42 GMT"/>
	      <accelerator key="8" modifiers="0" signal="clicked"/>
	    </widget>
	    <packing>
	      <property name="left_attach">1</property>
	      <property name="right_attach">2</property>
	      <property name="top_attach">2</property>
	      <property name="bottom_attach">3</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="nine">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">_9</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_nine_clicked" last_modification_time="Fri, 22 Apr 2005 14:39:46 GMT"/>
	      <accelerator key="9" modifiers="0" signal="clicked"/>
	    </widget>
	    <packing>
	      <property name="left_attach">2</property>
	      <property name="right_attach">3</property>
	      <property name="top_attach">2</property>
	      <property name="bottom_attach">3</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="zero">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">_0</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_zero_clicked" last_modification_time="Fri, 22 Apr 2005 14:39:51 GMT"/>
	      <accelerator key="0" modifiers="0" signal="clicked"/>
	    </widget>
	    <packing>
	      <property name="left_attach">1</property>
	      <property name="right_attach">2</property>
	      <property name="top_attach">3</property>
	      <property name="bottom_attach">4</property>
	    </packing>
	  </child>
	</widget>
	<packing>
	  <property name="padding">0</property>
	  <property name="expand">True</property>
	  <property name="fill">True</property>
	</packing>
      </child>

      <child>
	<widget class="GtkVBox" id="vbox2">
	  <property name="visible">True</property>
	  <property name="homogeneous">False</property>
	  <property name="spacing">0</property>

	  <child>
	    <widget class="GtkHSeparator" id="hseparator4">
	      <property name="visible">True</property>
	    </widget>
	    <packing>
	      <property name="padding">4</property>
	      <property name="expand">False</property>
	      <property name="fill">False</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="preset1">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">preset 1</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_preset1_clicked" last_modification_time="Sat, 25 Jun 2005 18:07:57 GMT"/>
	    </widget>
	    <packing>
	      <property name="padding">0</property>
	      <property name="expand">False</property>
	      <property name="fill">False</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="preset2">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">preset 2</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_preset2_clicked" last_modification_time="Sat, 25 Jun 2005 18:07:51 GMT"/>
	    </widget>
	    <packing>
	      <property name="padding">0</property>
	      <property name="expand">False</property>
	      <property name="fill">False</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="preset3">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">preset 3</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_preset3_clicked" last_modification_time="Sat, 25 Jun 2005 18:07:42 GMT"/>
	    </widget>
	    <packing>
	      <property name="padding">0</property>
	      <property name="expand">False</property>
	      <property name="fill">False</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="preset4">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">preset 4</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_preset4_clicked" last_modification_time="Sat, 25 Jun 2005 18:07:34 GMT"/>
	    </widget>
	    <packing>
	      <property name="padding">0</property>
	      <property name="expand">False</property>
	      <property name="fill">False</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="preset5">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">preset 5</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_preset5_clicked" last_modification_time="Sat, 25 Jun 2005 18:07:28 GMT"/>
	    </widget>
	    <packing>
	      <property name="padding">0</property>
	      <property name="expand">False</property>
	      <property name="fill">False</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="preset6">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">preset 6</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_preset6_clicked" last_modification_time="Sat, 25 Jun 2005 18:07:15 GMT"/>
	    </widget>
	    <packing>
	      <property name="padding">0</property>
	      <property name="expand">False</property>
	      <property name="fill">False</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="preset7">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">preset 7</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_preset7_clicked" last_modification_time="Sat, 25 Jun 2005 18:07:05 GMT"/>
	    </widget>
	    <packing>
	      <property name="padding">0</property>
	      <property name="expand">False</property>
	      <property name="fill">False</property>
	    </packing>
	  </child>

	  <child>
	    <widget class="GtkButton" id="preset8">
	      <property name="visible">True</property>
	      <property name="can_focus">True</property>
	      <property name="label" translatable="yes">preset 8</property>
	      <property name="use_underline">True</property>
	      <property name="relief">GTK_RELIEF_NORMAL</property>
	      <property name="focus_on_click">True</property>
	      <signal name="clicked" handler="on_preset8_clicked" last_modification_time="Sat, 25 Jun 2005 18:06:53 GMT"/>
	    </widget>
	    <packing>
	      <property name="padding">0</property>
	      <property name="expand">False</property>
	      <property name="fill">False</property>
	    </packing>
	  </child>
	</widget>
	<packing>
	  <property name="padding">0</property>
	  <property name="expand">True</property>
	  <property name="fill">True</property>
	</packing>
      </child>
    </widget>
  </child>
</widget>

</glade-interface>
"""
	
if __name__ == "__main__":
	
	app = Remote()
	gtk.main()
	
		
	
